package com.liangwj.springbootdesignpatterns.createTypePatterns.factoryMethod.demo;

public class BenzFactoryDemoTest {
    public static void main(String[] args) {
        System.out.println("生产奔驰C180车:");
        //父类接收子类对象的实例
        BenzFactory benzFactory = new C180Factory();
        benzFactory.createCar();

        System.out.println("=======================================");

        System.out.println("生产奔驰C180车:");
        BenzFactory benzFactory1 = new E260Factory();
        benzFactory1.createCar();

    }
}
